POV-Ray : Newsgroups : povray.general : A macro that drops a vector-- what's the syntax again? : Re: A macro that drops a vector-- what's the syntax again? Server Time
1 Aug 2024 16:25:46 EDT (-0400)
  Re: A macro that drops a vector-- what's the syntax again?  
From: John VanSickle
Date: 10 Nov 2005 19:14:32
Message: <4373e268@news.povray.org>
Zeger Knaepen wrote:

> "kurtz le pirate" <kur### [at] yahoofr> wrote in message
news:kurtzlepirate-B61563.07015210112005@news.povray.org...
> 
>>In article <4372b765@news.povray.org>,
>> "Greg M. Johnson" <p t e r a n d o n @ 
>> thecommononethatstartswithY.com> wrote:
>>
>>::I cannot get the following code to work:
>>::
>>:://-----------------------------
>>::#macro sign(a)
>>::#if (a<0)
>>::        (-a)
>>::#else
>>::        (a)
>>::#end
>>::#end
>>
>>... abs() already exist in pov
> 
> 
> what's abs() got to do with sign(), except that you can make sign() with
sign(x)=x/abs(x) ?

With a divide-by-zero error when x==0.

Regards,
John


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.